1. Field of the Invention
The present invention relates to a color converting method of converting a chrominance signal of a different color space by using a multidimensional color conversion table and, more particularly, to a color converting method of converting a chrominance signal which is not registered in a conversion table by an interpolation calculation.
2. Description of the Related Arts
Color image apparatuses such as personal computer, color printer, digital camera, and the like are at present being widespread owing to the realization of high performance and low costs. Generally, the apparatus such as printer, display, or the like expresses a color of an RGB space, a CMY space, or the like of a primary color system. In this case, since the color that is outputted from the RGB space or CMY space differs depending on the apparatus such as a display or a printer, it can be regarded as a chrominance signal depending on the apparatus. In order to make the colors coincide among the different apparatuses, as a chrominance signal showing an absolute color that does not depend on the apparatus, there is a method of processing the chrominance signal by using an L*a*b* space, an XYZ space, or the like of a luminance color difference separation system as a reference. For example, when the color of the L*a*b* space is outputted to a printer, if the color of the L*a*b* space is converted to the color of the CMY space peculiar to the printer and the chrominance signal is printed, fundamentally, any printer can output the same color. A technique for converting the chrominance signal between the different color spaces is called a color converting technique. As such a color converting technique, a color conversion using a multidimensional conversion table (multidimensional look-up table) has been known.
FIGS. 1A to 1C are explanatory diagrams of a multidimensional conversion space to realize the multidimensional conversion table. FIG. 1A shows an RGB/Lab conversion coordinates space 100 to convert the color from the RGB space to the L*a*b* space. FIG. 1B shows an Lab/CMY conversion coordinates space 102 to convert the color from the L*a*b* space to the CMY space. Further, FIG. 1C shows an RGB/CMY conversion coordinates space 104 to convert the color from the RGB space to the CMY space. For instance, when the color of the RGB space of a display is converted to the color of the CMY space of a printer, RGB color values are inputted to the RGB/Lab conversion coordinates space 100 of FIG. 1A, thereby converting to L*a*b* color values. Subsequently, the L*a*b* color values are inputted to the Lab/CMY conversion coordinates space 102 of FIG. 1B, thereby converting to CMY color values. Practically, the RGB/CMY conversion coordinates space 104 in which the conversion to the intermediate L*a*b* space as shown in FIG. 1B is omitted is used. The RGB color values are inputted to the RGB/CMY conversion coordinates space 104 and are directly converted to the CMY color values. In such a multidimensional conversion table, output representative colors of the color space on the conversion destination side are set to lattice points which are decided by input representative colors of the color space serving as a converting source. The table is used in combination with an interpolation calculating mechanism, so that the high-speed and accurate color conversion can be realized by a small memory capacity of the table.
As an interpolating method in the conventional color converting method in which the multidimensional conversion table and the interpolation calculating mechanism are combined, a cube interpolating method (Cube Algorithm) has been known. According to the cube interpolating method, as for the multidimensional conversion space constructed by a set of lattice points having a predetermined width constructing the multidimensional conversion table, an output color corresponding to an input color at an arbitrary position existing in a lattice space is obtained from output colors set at eight vertices of the lattice space constructing a cube by an interpolation calculation. The cube interpolating method will be explained with respect to a case where the color is converted from the RGB space of the display to the CMY space of the printer as an example. FIG. 2 shows the details of the RGB/CMY conversion coordinates space 104 of FIG. 1C. Color values of the RGB space serving as an input color and color values of the CMY space serving as an output color have values within a range of 0 to 255. In the RGB/CMY conversion coordinates space 104, for example, a lattice interval w is set to 32 (w=32), each of the input colors (R, G, B) serving as a converting source has representative input colors 0, 32, 64, 96, 128, 160, 192, 224, and 255, respectively. The representative output colors (C, M, Y) after completion of the conversion have been stored at positions of the lattice points which are decided by the representative input colors.
Specifically speaking, the CMY representative output colors are stored at the lattice points of the RGB space in accordance with the following arrangements.
C[r, g, b]
M[r, g, b]
xe2x80x83Y[r, g, b]
where, r, g, and b denote lattice numbers indicative of a coordinates position in a lattice space serving as a cube surrounded by eight lattice points. Since the lattice space is called a data set, the lattice number is also called a data set number. Explanation will now be made on the assumption that the lattice space is the data set. The data set numbers indicative of a three-dimensional position of the lattice point where an arbitrary input color (R, G, B) is included are obtained by the following equations.
r=(int)(R÷w)
g=(int)(G÷w)
b=(int)(B÷w)xe2x80x83xe2x80x83(1)
where, w denotes the lattice interval and, for example, w=32. (int) means a formation of an integer by rounding-off. For instance, the data set numbers corresponding to the minimum value (0, 0, 0) of the input color (R, G, B) are set to r=0, g=0, and b=0. The data set numbers corresponding to an input color (32, 0, 0) are set to r=1, g=0, and b=0. Further, the data set numbers corresponding to an input color (32, 128, 128) are set to r=1, g=4, and b=4.
As shown in FIG. 3, in the cube interpolating method, interpolating arithmetic operations are performed by using eight lattice points A1 to A8 serving as vertices of a cube surrounding an interpolation point 110 of an input color (Rc, Gc, Bc). First, when coordinates positions shown by the data set numbers of the eight lattice points A1 to A8 surrounding the interpolation point 110 are shown by setting the lattice point A1 to a reference position and setting the other positions to relative positions for the reference position, the following coordinates values are obtained.
A1(r, g, b)
A2(r+1, g, b)
A3(r, g+1, b)
A4(r+1, g+1, b)
A5(r, g, b+1)
A6(r+1, g, b+1)
A7(r, g+1, b+1)
A8(r+1, g+1, b+1)
When output colors (C, M, Y) set in the lattice points A1 to A8 are expressed by arrangements of the lattice point coordinates, the following equations are obtained.
C1=C[r, g, b]
C2=C[r+1, g, b]
xe2x80x83C3=C[r, g+1, b]
C4=C[r+1, g+1, b]
C5=C[r, g, b+1]
C6=C[r+1, g, b+1]
C7=C[r, g+1, b+1]
C8=C[r+1, g+1, b+1]
M1=M[r, g, b]
M2=M[r+1, g, b]
M3=M[r, g+1, b]
M4=M[r+1, g+1, b]
M5=M[r, g, b+1]
M6=M[r+1, g, b+1]
M7=M[r, g+1, b+1]
M8=M[r+1, g+1, b+1]
Y1=Y[r, g, b]
Y2=Y[r+1, g, b]
Y3=Y[r, g+1, b]
Y4=Y[r+1, g+1, b]
Y5=Y[r, g, b+1]
Y6=Y[r+1, g, b+1]
Y7=Y[r, g+1, b+1]
Y8=Y[r+1, g+1, b+1]
The output colors (C, M, Y) set in the lattice points A1 to A8 are shown as follows for simplicity of description.
A1(C1, M1, Y1)
A2(C2, M2, Y2)
A3(C3, M3, Y3)
A4(C4, M4, Y4)
A5(C5, M5, Y5)
A6(C6, M6, Y6)
A7(C7, M7, Y7)
A8(C8, M8, Y8)
A position (Rs, Gs, Bs) in the data set of the interpolation point 110 having an input color (Rc, Gc, Bc) is calculated by the following equations.
Rs=(Rc)%w
Gs=(Gc)%w
Bs=(Bc)%wxe2x80x83xe2x80x83(2)
where, % denotes a remainder of the division.
As shown in FIG. 4, volumes V1 to V8 of eight rectangular prisms obtained by dividing the cube in the lattice point space so as to include the lattice points A1 to A8 for the interpolation point 110 are calculated as linear conversion parameters to be used for the interpolation calculations.
xe2x80x83V8=(wxe2x88x92Rs)xc3x97(wxe2x88x92Gs)xc3x97(wxe2x88x92Bs)
V7=Rsxc3x97(wxe2x88x92Gs)xc3x97(wxe2x88x92Bs)
V6=(wxe2x88x92Rs)xc3x97Gsxc3x97(wxe2x88x92Bs)
V5=Rsxc3x97Gsxc3x97(wxe2x88x92Bs)
V4=(wxe2x88x92Rs)xc3x97(wxe2x88x92Gs)xc3x97Bs
V3=Rsxc3x97(wxe2x88x92Gs)xc3x97Bs
V2=(wxe2x88x92Rs)xc3x97Gsxc3x97Bs
V1=Rsxc3x97Gsxc3x97Bsxe2x80x83xe2x80x83(3)
Finally, an output color (Cx, Mx, Yx) at the interpolation point 110 is calculated by the interpolation calculation. In the interpolation calculation, the output colors (C1, M1, Y1) to (C8, M8, Y8) at the eight lattice points A1 to A8 are weighted by the linear conversion parameters V1 to V8 calculated by the equations (3), thereby averaging them. The output color is calculated by the following equations.
Cx={C1xc3x97V8+C2xc3x97V7+C3xc3x97V6+C4xc3x97V5+C5xc3x97V4+C6xc3x97V3+C7xc3x97V2+C8xc3x97V1}÷(wxc3x97wxc3x97w)
Mx={M1xc3x97V8+M2xc3x97V7+M3xc3x97V6+M4xc3x97V5+M5xc3x97V4+M6xc3x97V3+M7xc3x97V2+M8xc3x97V1}÷(wxc3x97wxc3x97w)
xe2x80x83Yx={Y1xc3x97V8+Y2xc3x97V7+Y3xc3x97V6+Y4xc3x97V5+Y5xc3x97V4+Y6V3+Y7xc3x97V2+Y8xc3x97V1}÷(wxc3x97wxc3x97w)xe2x80x83xe2x80x83(4)
In the conventional cube interpolating method, it is assumed that the output colors set at the eight lattice points in the lattice point space used to calculate the linear conversion parameters linearly change in a range from the maximum value to the minimum value. Therefore, all of the output colors at the eight lattice points forming the cube which surrounds the interpolation point are referred at the time of the interpolation calculation. However, in case of data in which the input color increases or decreases only in a single direction, for example, in case of having an achromatic gradation known as a gray axis, there is no unidirectional property in the output color obtained by the interpolation calculation depending on values of the output colors at the lattice points surrounding the interpolation point, so that there is a problem of occurrence of reversal to the directional property in the output color at the interpolation point.
FIG. 5 is an explanatory diagram in the case where the output color at the interpolation point calculated by interpolating is reversed for the axis of the achromatic gradation in which only the lightness changes from black and reaches white. An axis connecting the lattice points A1 and A8 in the data set is an achromatic gradation axis 120. In this instance, when an input color (Ri, Gi, Bi) at the interpolation point 110 located on the achromatic gradation axis 120 is equal to (16, 16, 16), a relative position (Rs, Gs, Bs) in the data set is equal to (16, 16, 16) according to the equations (2). When the conversion parameters V1 to V8 serving as volume ratios are calculated from the equations (3),
V1 to V8=16xc3x9716xc3x9716=4096
When the values of the linear conversion parameters V1 to V8 are substituted into the equations (4), the output color (Cx, Mx, Yx) at the interpolation point is as follows.
Cx=(23+27+30+39+4+24+50+0)xc3x974096÷32768=25
Mx=(5+81+13+9+59+59+2+0)xc3x974096÷32768=29
Yx=(24+29+115+30+111+27+0)xc3x974096÷32768=48
Inherently, the relations
(C1, M1, Y1) less than (Cx, Mx, Yx) less than (C8, M8, Y8)
have to be satisfied among the output colors at the lattice point A1, interpolation point X, and lattice point A8.
In the conventional cube interpolating method, however, since the conversion parameters V1 to V8 are formed by referring to the output colors of all of the lattice points A1 to A8, the output color at the interpolation point 110 is attracted to the output colors at the lattice points A2 to A7 which do not have the same directional property for the achromatic gradation axis 120 and exceed the output color at the lattice point A8, so that a reverse phenomenon occurs among the output colors at the lattice points A1 to A8. As for the problem of the reverse phenomenon of the output colors by the interpolation calculation on the achromatic gradation axis, for example, in JP-7-099,587, as shown in FIG. 6, an interpolation cube 140 adjacent to a unit cube 130 is defined, an oblique triangular prism 150 is set between them, the achromatic gradation axis 120 is allocated onto an edge line between lattice points (a and e) of the oblique triangular prism 150, and the achromatic interpolation is performed by referring to only the lattice points (a and e) serving as two end points of the edge line 150, thereby preventing the reverse phenomenon from occurring in the output color at the interpolation point locating on the edge line 150. According to the method, however, since gradations other than the achromatic color are not guaranteed, the problem remains. As a second problem in the conventional cube interpolating method, when the linear interpolation is used for the color conversion in a region having a high non-linearity like, for example, a y curve, although desired output values are shown by a curve, actual output values are shown by a line obtained by connecting straight lines whose angles are slightly changed, so that a large conversion error occurs.
FIG. 7 shows a G-R plane of the multidimensional conversion coordinates space 104 in which the RGB input color is converted to the CMY output color. The plane shows parts of a data set 104-1 having boundaries shown by broken lines and neighboring data sets 104-2, 104-3, and 104-4. The input color changes as shown by A1 and A26 at the boundary of the data set 104-1. The output color is interpolated by a straight line 170-1 connecting the lattice points A1 and A26 in the data set 104-1. The output color at the lattice point A26 on the data set boundary is obtained by a straight line interpolation of the output colors at the lattice points A2 and A6. As compared with the change in output color interpolated by the straight line 170-1, an actual output color changes like a curve 180 as, for example, a xcex3 curve and a large conversion error occurs between the actual output color and the output color interpolated by the straight line 170-1. Similarly in the next data set 104-2 as well, as compared with an output color interpolated by a straight line 170-2, a large conversion error occurs between the curve 180 as a change in inherent output color and the line 170-2.
According to the invention, there is provided a color converting method in which an inversion of an output color by the reference to the periphery at a position where the directional property of gradation has to be guaranteed is prevented.
According to the invention, there is provided a color converting method in which a conversion precision is improved by reducing a conversion error occurring in an interpolation of an output color having high non-linearity for a linear input color.
According to the invention, there is provided a color converting method based on a cube interpolating method, comprising a conversion table forming step, a linear conversion parameter calculating step, a non-linear conversion parameter forming step, a discriminating step, a linear interpolating step, and a non-linear converting step. Among them, the conversion table forming step, linear conversion parameter calculating step, and linear interpolating step are executed in the same procedure as that of an existing cube interpolating method. The non-linear conversion parameter forming step, discriminating step, and non-linear converting step which are peculiar to the invention are added to the above procedure.
In the conversion table forming step, a multi-dimensional conversion table in which an output color of a second color space corresponding to an input color of a first color space is stored at each lattice point in a multi-dimensional conversion coordinates space having a predetermined lattice interval (w) is formed. In the linear conversion parameter calculating step, linear conversion parameters V1 to V8 which are used in an interpolation calculation of an output color corresponding to an input color at a point other than the lattice points in the conversion coordinates space are calculated. In the non-linear conversion parameter calculating step, non-linear conversion parameters VV1 to VV8 which are used in the interpolation calculation of an output color corresponding to an input color at a point other than the lattice points in the conversion coordinates space are calculated. In the discriminating step, it is discriminated which ones of the linear conversion parameters and the non-linear conversion parameters are used each time the input color in the first color space is fetched. In the linear interpolating step, an output color at an interpolation point is interpolation calculated by using the linear conversion parameters discriminated in the discriminating step. In the non-linear interpolating step, the output color at the interpolation point is interpolation calculated by using the non-linear conversion parameters discriminated in the discriminating step. According to the color converting method of the invention as mentioned above, the interpolation calculation using the non-linear conversion parameters which guarantee gradation and have high precision and the interpolation calculation using the linear conversion parameters which can be processed at a high speed are provided as an interpolating process for converting the input color of the first color space into the output color of the second color space. The interpolation calculation using the non-linear conversion parameters with high precision is executed with respect to only a necessary region and the linear conversion parameters which can be processed at a high speed are calculated with respect to the rest region, thereby certainly preventing an inversion of the output color in a region including an achromatic gradation axis and performing the color conversion with high precision as a whole and whose performance is hardly influenced.
In the linear conversion parameter calculating step, with respect to a data set (unit lattice space) constructing the conversion coordinates space, it is regarded that an output color at each interpolation point changes from the minimum value to the maximum value which are given by output colors at the internal lattice points, and the linear conversion parameters V1 to V8 corresponding to data set positions at eight lattice points of a data set surrounding the interpolation point are calculated every interpolation point and held. That is, in the linear conversion parameter calculating step, the inside of the data set is divided into eight rectangular prisms so as to include peripheral eight lattice points around the interpolation point and volumes of the divided spaces are calculated as linear conversion parameters V1 to V8. In the linear conversion parameter forming step, when the data set is set to a cube having a lattice width of (w) and the first color space is set to an RGB space and a position (Rs, Gs, Bs) of the interpolation point in the data set corresponding to three input color components (Rc, Gc, Bc) is calculated as
Rs=(Rc)%w
Gs=(Gc)%w
Bs=(Bc)%w
where, % is a remainder, the linear conversion parameters V1 to V8 are calculated as follows.
V1=Rsxc3x97Gsxc3x97Bs
xe2x80x83V2=(wxe2x88x92Rs)xc3x97Gsxc3x97Bs
V3=Rsxc3x97(wxe2x88x92Gs)xc3x97Bs
V4=(wxe2x88x92Rs)xc3x97(wxe2x88x92Gs)xc3x97Bs
V5=Rsxc3x97Gsxc3x97(wxe2x88x92Bs)
V6=(wxe2x88x92Rs)xc3x97Gsxc3x97(wxe2x88x92Bs)
V7=Rsxc3x97(wxe2x88x92Gs)xc3x97(wxe2x88x92Bs)
V8=(wxe2x88x92Rs)xc3x97(wxe2x88x92Gs)xc3x97(wxe2x88x92Bs)
In the linear conversion parameter calculating step, when the first color space is set to an L*a*b* space and a relative position (Ls, as, bs) of the interpolation point in the data set corresponding to three input color components (L*c, a*c, b*c) is calculated as
Ls=(L*c)%w
as=(a*c)%w
bs=(b*c)%w
where, % is a remainder, the linear conversion parameters are calculated as follows.
V1=Lsxc3x97asxc3x97bs
V2=(wxe2x88x92Ls)xc3x97asxc3x97bs
V3=Lsxc3x97(wxe2x88x92as)xc3x97bs
V4=(wxe2x88x92Ls)xc3x97(wxe2x88x92as)xc3x97bs
V5=Lsxc3x97asxc3x97(wxe2x88x92bs)
V6=(wxe2x88x92Ls)xc3x97asxc3x97(wxe2x88x92bs)
xe2x80x83V7=Lsxc3x97(wxe2x88x92as)xc3x97(wxe2x88x92bs)
V8=(wxe2x88x92Ls)xc3x97(wxe2x88x92as)xc3x97(wxe2x88x92bs)
The linear conversion parameters V1 to V8 are calculated according to an existing cube interpolating method.
In the non-linear conversion parameter forming step peculiar to the invention, with respect to a unit lattice space (data set) constructing a conversion coordinates space, it is regarded that an output color at each interpolation point linearly changes on a gradation guarantee line connecting two lattice points and the output color at each interpolation point non-linearly changes in a portion except for the above points. The non-linear conversion parameters VV1 to VV8 corresponding to eight lattice points surrounding the guarantee point are calculated in such a manner that as the interpolation point approaches the guarantee line, the ratio of referring to the lattice points at both ends of the guarantee line is increased and the ratio of referring to the lattice points other than the points out of the guarantee line is decreased. By using the non-linear conversion parameters which non-linearly change in accordance with a distance from the guarantee line which guarantees gradation and connects arbitrary colors positioning on a data set boundary as mentioned above, the color conversion such that the nearer to the guarantee point is, the more the ratio of referring to the point to be guaranteed increases and an influence on a point which is not guaranteed is suppressed can be executed, so that the problem that the output color at the interpolation point on the guarantee line is inverted can be solved.
It is now assumed that a distance between an intersecting point of a perpendicular from the interpolation point to a guarantee line connecting two lattice points A1 and A8 in the data set and the interpolation point is set to L1, a distance between a boundary point passing through a data set external boundary on the extended perpendicular and the interpolation point is set to L2, distances between the intersecting point of the guarantee line and the perpendicular and the lattice points A1 and A8 at both ends are set to B2 and B1, respectively, the sum of the distances is set to (B1+B2=B0), and the linear conversion parameters corresponding to the eight lattice points are set to V1 to V8. In this case, the non-linear conversion parameters VV1 to VV8 corresponding to the eight lattice points A1 to A8 are calculated by the following equations.                     VV1        =                                                            {                                                      (                                          V1                      ÷                      www                                        )                                    xc3x97                  L1                                }                            +                              {                                                      (                                          B1                      ÷                      B0                                        )                                    xc3x97                  L2                                }                                                    (                              L1                +                L2                            )                                xc3x97          www                                        VV2        =                                            {                                                (                                      V2                    ÷                    www                                    )                                xc3x97                L1                            }                                      (                              L1                +                L2                            )                                xc3x97          www                                        VV3        =                                            {                                                (                                      V3                    ÷                    www                                    )                                xc3x97                L1                            }                                      (                              L1                +                L2                            )                                xc3x97          www                                        VV4        =                                            {                                                (                                      V4                    ÷                    www                                    )                                xc3x97                L1                            }                                      (                              L1                +                L2                            )                                xc3x97          www                                        VV5        =                                            {                                                (                                      V5                    ÷                    www                                    )                                xc3x97                L1                            }                                      (                              L1                +                L2                            )                                xc3x97          www                                        VV6        =                                            {                                                (                                      V6                    ÷                    www                                    )                                xc3x97                L1                            }                                      (                              L1                +                L2                            )                                xc3x97          www                                        VV7        =                                            {                                                (                                      V7                    ÷                    www                                    )                                xc3x97                L1                            }                                      (                              L1                +                L2                            )                                xc3x97          www                                        VV8        =                                                            {                                                      (                                          V8                      ÷                      www                                        )                                    xc3x97                  L1                                }                            +                              {                                                      (                                          B2                      ÷                      B0                                        )                                    xc3x97                  L2                                }                                                    (                              L1                +                L2                            )                                xc3x97          www                    
In the second parameter forming step, when the interpolation point exists on the guarantee line connecting the two lattice points A1 and A8 in the data set, the distance L1 between the interpolation point of the right side of the calculation equation of each of the non-linear conversion parameters VV1 to VV8 and the intersecting point of the guarantee line and the perpendicular is set to (L1=0). Thus, the non-linear conversion parameters VV1 to VVB corresponding to the eight lattice points A1 to A8 are calculated as follows.
VV1=(wxc3x97wxc3x97w)xc3x97(B1/B0)
VV2=0
VV3=0
VV4=0
VV5=0
VV6=0
VV7=0
VV8=(wxc3x97wxc3x97w)xc3x97(B2/B0)
In the discriminating step, whether the data set to which the input color in the first color space belongs includes the guarantee line of the achromatic gradation or not is discriminated. When it is determined that the data set includes the guarantee line, the interpolation calculation using the non-linear conversion parameters VV1 to VV8 is selected. When it is decided that the guarantee line is not included, the interpolation calculation using the linear conversion parameters VV1 to VV8 is selected.
In the discriminating step, when the first color space is an RGB space, a position (r, g, b) in the data set to which the input color (R, G, B) belongs is calculated by using the lattice width (w) as follows.
r=(int)R÷w
g=(int)G÷w
b=(int)B÷w
where, (int) denotes formation of an integer by rounding off.
When r=g=b is satisfied, it is determined that the data set includes the guarantee line and the interpolation calculation using the non-linear conversion parameters VV1 to VV8 is selected.
When r=g=b is not satisfied, it is decided that the data set does not include the guarantee line, and the interpolation calculation using the linear conversion parameters V1 to V8 is selected. In the discriminating step, a preliminarily designated result is discriminated and either the interpolation calculation using the linear conversion parameters V1 to V8 or the interpolation calculation using the non-linear conversion parameters VV1 to VV8 is selected. For example, the user designates in accordance with the kind of an image to be color converted by a user interface. In this case, when an image is a natural image such as a photograph or the like whose gradation does not have to be guaranteed, the use of the linear conversion parameters V1 to V8 is designated. When the image is a graph, a business document, a CG image, or the like whose gradation has to be guaranteed, the use of the non-linear conversion parameters VV1 to VV8 is designated. By executing the non-linear interpolation calculation with high precision only to a region in which the gradation has to be guaranteed and by executing the linear interpolation calculation which can be processed at a high speed to the rest of the region, a color conversion with high precision as a whole and whose performance is hardly influenced can be performed.
In the linear interpolation calculating step, output colors at eight lattice points in the lattice space to which the interpolation point belongs are weighted by the linear conversion parameters corresponding to the position of the interpolation point in the unit lattice space and a mean of the weighted output colors is calculated as an output color at the interpolation point. In the linear interpolation calculating step, the invention is characterized in that when predetermined non-linear characteristics, for example, xcex3 characteristics are set into the output color by using a multi-dimensional conversion table in which an input color and an output color have been set in accordance with a linear relation, after a re-calculation for converting the input color at the interpolation point to a position based on the non-linear characteristics was performed, the output color at the re-calculated interpolation point is calculated by the linear interpolation calculation. As for the re-calculation at the interpolation point in the linear interpolation calculating step, the input color (Rc, Gc, Bc) at the interpolation point is divided by the maximum color value 255 and is converted into a position (Rn, Gn, Bn) in a data set normalized to, for example, 0 to 1, and after that, the conversion calculation of the non-linear characteristics is executed. An input color at the interpolation point according to the non-linear characteristics is re-calculated by multiplying the converted calculation value by the maximum color value 255, and an output color corresponding to the re-calculated input color at the interpolation point is calculated by the linear interpolation. By the re-calculation of the input color at the interpolation point according to the non-linear characteristics of the output color, the position of the interpolation point is corrected from a position on the interpolation straight line to a position on a curve which gives the non-linear characteristics of the output color. Even if there are strong non-linear characteristics of the output color, an interpolation result having a small conversion error is obtained.
In the linear interpolation calculating step, for example, in the case where the second space is the CMY space, the output colors at the eight lattice points A1 to A8 in the lattice space to which the interpolation point belongs are set to (C1, M1, Y1) to (C8, M8, Y8) and the linear conversion parameters corresponding to the position of the interpolation point are set to V1 to V8, an output color (Cx, Mx, Yx) at the interpolation point is calculated as follows.
Cx={C1xc3x97V8+C2xc3x97V7+C3xc3x97V6+C4xc3x97V5+C5xc3x97V4+C6xc3x97V3+C7xc3x97V2+C8xc3x97V1}÷(wxc3x97wxc3x97w)
Mx={M1xc3x97V8+M2xc3x97V7+M3xc3x97V6+M4xc3x97V5+M5xc3x97V4+M6xc3x97V3+M7xc3x97V2+M8xc3x97V1}÷(wxc3x97wxc3x97w)
Yx={Y1xc3x97V8+Y2xc3x97V7+Y3xc3x97V6+Y4xc3x97V5+Y5xc3x97V4+Y6xc3x97V3+Y7xc3x97V2+Y8xc3x97V1}÷(wxc3x97wxc3x97w)
This calculating method is based on the existing cube interpolating method.
In the linear interpolation calculating step, in the case where the second space is the L*a*b* space, when the output colors at the eight lattice points A1 to A8 in the lattice space to which the interpolation point belongs are set to (L*1, a*1, b*1) to (L*8, a*8, b*8) and the linear conversion parameters are set to V1 to V8, an output color (L*x, a*x, b*x) at the interpolation point is calculated as follows.
L*x={L*1xc3x97V8+L*2xc3x97V7+L*3xc3x97V6+L*4xc3x97V5+L*5xc3x97V4+L*6xc3x97V3+L*7xc3x97V2+L*8xc3x97V1}÷(wxc3x97wxc3x97w)
a*x={a*1xc3x97V8+a*2xc3x97V7+a*3xc3x97V6+a*4xc3x97V5+a5xc3x97V4+a*6xc3x97V3+a*7xc3x97V2+a*8xc3x97V1}(wxc3x97wxc3x97w)
b*x={b*1xc3x97V8+b*2xc3x97V7+b*3xc3x97V6+b*4xc3x97V5+b*5xc3x97V4+b*6xc3x97V3+b*7xc3x97V2+b*8xc3x97V1}÷(wxc3x97wxc3x97w)
In the non-linear interpolation calculating step peculiar to the invention, the output colors at the eight lattice points in the lattice space to which the interpolation point belongs are weighted by the non-linear conversion parameters at the lattice points and a mean of the weighted out colors is calculated as an output color at the interpolation point.
In the non-linear interpolation calculating step, in the case where the second space is the CMY space, when the output colors at the eight lattice points A1 to A8 in the lattice space to which the interpolation point belongs are set to (C1, M1, Y1) to (C8, M8, Y8) and the non-linear conversion parameters are set to VV1 to VV8, an output color (Cx, Mx, Yx) at the interpolation point is calculated as follows.
Cx={C1xc3x97VV8+C2xc3x97VV7+C3xc3x97VV6+C4xc3x97VV5+C5xc3x97VV4+C6xc3x97VV3+C7xc3x97VV2+C8xc3x97VV1}÷(wxc3x97wxc3x97w)
Mx={M1xc3x97VV8+M2xc3x97VV7+M3xc3x97VV6+M4xc3x97VV5+M5xc3x97VV4+M6xc3x97VV3+M7xc3x97VV2+M8xc3x97VV1}÷(wxc3x97wxc3x97w)
Yx={Y1xc3x97VV8+Y2xc3x97VV7+Y3xc3x97VV6+Y4xc3x97VV5+Y5xc3x97VV4+Y6xc3x97VV3+Y7xc3x97VV2+Y8xc3x97VV1}÷(wxc3x97wxc3x97w)
In the non-linear interpolation calculating step, in the case where the second space is the L*a*b* space, when the output colors at the eight lattice points A1 to A8 in the lattice space to which the interpolation point belongs are set to (L*1, a*1, b*1) to (L*8, a*8, b*8) and the linear conversion parameters are set to VV1 to VV8, the output color (L*x, a*x, b*x) at the interpolation point is calculated as follows.
L*x={L*1xc3x97VV8+L*2xc3x97VV7+L*3xc3x97VV6+L*4xc3x97VV5+L*5xc3x97VV4+L*6xc3x97VV3+L*7xc3x97VV2+L*8xc3x97VV1}÷(wxc3x97wxc3x97w)
a*x={a*1xc3x97VV8+a*2xc3x97VV7+a*3xc3x97vv6+a*4xc3x97VV5+a*5xc3x97VV4+a*6xc3x97VV3+a*7xc3x97VV2+a*8xc3x97VV1}÷(wxc3x97wxc3x97w)
b*x={b*1xc3x97VV8+b*2xc3x97VV7+b*3xc3x97VV6+b*4xc3x97VV5+b*5xc3x97VV4+b*6xc3x97VV3+b*7xc3x97VV2+b*8xc3x97VV1}÷(wxc3x97wxc3x97w)
According to such linear interpolation calculating step and the non-linear interpolation calculating step, even if the output color at the interpolation point is determined by using the non-linear conversion parameters in the data set neighboring to the data set in which the output color at the interpolation point has been determined by using the linear conversion parameters, although the output color changes non-linearly in the data set, the output color changes linearly as the interpolation point approaches a boundary region. Thus, even if the data set using the linear conversion parameters and the data set using the non-linear conversion parameters mixedly exist, an almost same output color can be determined by the interpolation calculation in the boundary region of the data sets, so that the continuity of the output colors in the boundary region of the lattice space can be guaranteed. In the interpolation calculation using the non-linear conversion parameters, to determine the output color at the interpolation point on the gradation guarantee line connecting two lattice points in the lattice space, by setting the non-linear conversion parameter which refers to the output color in the boundary region with the neighboring lattice space to zero, a lattice point which is not referred to is caused, inversion or deviation of an output color by referring to the peripheral points is certainly prevented, and the directional property of the gradation is guaranteed.
The above and other objects, features, and advantages of the present invention will become more apparent from the following detailed description with reference to the drawings.